package com.bytedance.frameworks.baselib.network.http.util;

import java.util.Locale;

public final class c implements Cloneable {
    public String hostName;
    public int b;
    public String scheme;
    private String hostNameLowerCase;

    public c(String hostName, int arg4, String arg5) {
        if (hostName == null) {
            throw new IllegalArgumentException("Host name may not be null");
        }
        this.hostName = hostName;
        this.hostNameLowerCase = hostName.toLowerCase(Locale.ENGLISH);
        this.scheme = arg5 != null ? arg5.toLowerCase(Locale.ENGLISH) : "http";
        this.b = arg4;
    }

    public final Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    public final boolean equals(Object arg5) {
        boolean v0 = false;
        if (arg5 != null) {
            if (this == arg5) {
                v0 = true;
            } else if (((arg5 instanceof c)) && (this.hostNameLowerCase.equals(((c) arg5).hostNameLowerCase)) && this.b == ((c) arg5).b && (this.scheme.equals(((c) arg5).scheme))) {
                v0 = true;
            }
        }
        return v0;
    }

    public final int hashCode() {
        return android.support.design.a.a(android.support.design.a.a(17, (Object) this.hostNameLowerCase) * 37 + this.b, (Object) this.scheme);
    }

    public final String toString() {
        b v0 = new b(32);
        v0.a(this.scheme);
        v0.a("://");
        v0.a(this.hostName);
        if (this.b != -1) {
            v0.a(':');
            v0.a(Integer.toString(this.b));
        }
        return v0.toString();
    }
}

